<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:r="http://richfaces.org/rich">
	
	<r:dataScroller for="stocksTable"/>
	<r:dataTable id="stocksTable" value="#{stocks}" var="stock" rows="15">
		<r:column style="text-align:left;">
			<f:facet name="header">
				Name
			</f:facet>
			<r:collapsibleSubTableToggler for="resultSubTable" />
			<h:outputLink style="width:30px;" title="#{stock.name}" target="blank" value="http://www.onvista.de/aktien/snapshot.html?ID_OSI=#{stock.onVistaId}" >#{helperController.substring(stock.name, 10)}</h:outputLink>
			<ui:include src="/actions.xhtml" >
				<ui:param name="stock" value="#{stock}"/>
			</ui:include>
		</r:column>
		<r:column id="result" sortBy="#{stock.result.result}" sortOrder="ascending">
			<f:facet name="header">
				  <a onclick="#{r:component('stocksTable')}.sort('result');return false" href="#">Result</a>
			</f:facet>
			<h:outputText value="#{stock.result.result}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				CapType
			</f:facet>
			<h:outputText value="#{stock.capType}(#{helperController.getDoubleCeiled(stock.marktKapInMio)})" />
		</r:column>
		<r:column>
			<f:facet name="header">
				Dividende
			</f:facet>
			<h:outputText value="#{stock.dividendeAsPercent}(#{stock.dividende})" />
		</r:column>
		<r:column>
			<f:facet name="header">
				RoE LJ
			</f:facet>
			<h:outputText value="#{stock.roeLj}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				Ebit LJ
			</f:facet>
			<h:outputText value="#{stock.ebitLj}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				EigKap LJ
			</f:facet>
			<h:outputText value="#{stock.eigKapQuLj}" />
		</r:column>
		
		<r:column>
			<f:facet name="header">
				kurs
			</f:facet>
			<h:outputText value="#{stock.kursNow}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				kurs6m
			</f:facet>
			<h:outputText value="#{stock.kurs6monate}" />
		</r:column>
	<r:column>
			<f:facet name="header">
				kurs1j
			</f:facet>
			<h:outputText value="#{stock.kurs1jahr}" />
		</r:column>
		
		
		<r:column>
			<f:facet name="header">
				kgvAj
			</f:facet>
			<h:outputText value="#{stock.kgvAj}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				kgv1j
			</f:facet>
			<h:outputText value="#{stock.kgv1j}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				kgv2j
			</f:facet>
			<h:outputText value="#{stock.kgv2j}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				kgv3j
			</f:facet>
			<h:outputText value="#{stock.kgv3j}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				kgv4j
			</f:facet>
			<h:outputText value="#{stock.kgv4j}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				epsAj
			</f:facet>
			<h:outputText title="Gewinn je Aktie" value="#{stock.epsAj}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				epsNj
			</f:facet>
			<h:outputText title="Gewinn je Aktie" value="#{stock.epsNj}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				Analy.
			</f:facet>
			<h:outputText value="#{stock.analystenMeinung}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				3mReversal
			</f:facet>
			<h:outputText value="#{stock.dreimonatsReversal}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				reaktQz
			</f:facet>
			<h:outputText value="#{stock.reaktionQz}" />
		</r:column>
		<r:column>
			<f:facet name="header">
				gewinnRev
			</f:facet>
			<h:outputText value="#{stock.gewinnRev}" />
		</r:column>
		
		
		<r:collapsibleSubTable rows="1" expanded="#{false}" value="#{stock.result.criterias}" var="criteria" id="resultSubTable"
                expandMode="client">
                <r:column colspan="22">
                  	<ui:include src="viewStockResult.xhtml">
				<ui:param name="stock" value="#{stock}" />
			</ui:include>
                </r:column>
            </r:collapsibleSubTable>
	</r:dataTable>
	<r:dataScroller for="stocksTable"/>

	<!--  first row basics   -->
<!--	<p>-->
<!--		<b>Basisdaten</b>-->
<!--	</p>-->
<!--	<p class="edit60px">-->
<!--		<h:outputLabel for="wkn" value="wkn:" />-->
<!--		<h:outputText id="wkn" value="#{stock.wkn}">-->
<!--		</h:outputText>-->
<!---->
<!--		<h:outputLabel for="name" value="name:" />-->
<!--		<h:outputText id="name" value="#{stock.name}" />-->
<!---->
<!--		<h:outputLabel for="captype" value="captype:" />-->
<!--		<h:outputText id="captype" value="#{stock.capType}">-->
<!--		</h:outputText>-->
<!---->
<!--		<h:outputLabel for="dividende" value="dividende" />-->
<!--		<h:outputText id="dividende" value="#{stock.dividende}" />-->
<!--	</p>-->

	<!-- sedond row -->
<!--	<p>-->
<!--		<b>Kennzahlen</b>-->
<!--	</p>-->
<!--	<p>-->
<!--		<h:outputLabel for="roeLj" value="roeLj:" />-->
<!--		<h:outputText id="roeLj" value="#{stock.roeLj}" />-->
<!---->
<!--		<h:outputLabel for="ebitLj" value="ebitLj:" />-->
<!--		<h:outputText id="ebitLj" value="#{stock.ebitLj}" />-->
<!---->
<!--		<h:outputLabel for="eigKapQuLj" value="eigKapQuLj" />-->
<!--		<h:outputText id="eigKapQuLj" value="#{stock.eigKapQuLj}" />-->
<!---->
<!--		<h:outputLabel for="reaktionQz" value="reaktionQz:" />-->
<!--		<h:outputText id="reaktionQz" value="#{stock.reaktionQz}" />-->
<!---->
<!--		<h:outputLabel for="gewinnRev" value="gewinnRev" />-->
<!--		<h:outputText id="gewinnRev" value="#{stock.gewinnRev}" />-->
<!---->
<!--		<h:outputLabel for="epsAj" value="epsAj" />-->
<!--		<h:outputText id="epsAj" value="#{stock.epsAj}" />-->
<!---->
<!--		<h:outputLabel for="epsNj" value="epsNj" />-->
<!--		<h:outputText id="epsNj" value="#{stock.epsNj}" />-->
<!---->
<!--	</p>-->



	<!-- third row  kgvs     -->
<!--	<p>-->
<!--		<b>KGVS</b>-->
<!--	</p>-->
<!--	<p>-->
<!--		<h:outputLabel for="kgvAj" value="kgvAj:" />-->
<!--		<h:outputText id="kgvAj" value="#{stock.kgvAj}" />-->
<!---->
<!--		<h:outputLabel for="kgv1j" value="kgv1j:" />-->
<!--		<h:outputText id="kgv1j" value="#{stock.kgv1j}" />-->
<!---->
<!--		<h:outputLabel for="kgv2j" value="kgv2j:" />-->
<!--		<h:outputText id="kgv2j" value="#{stock.kgv2j}" />-->
<!---->
<!--		<h:outputLabel for="kgv3j" value="kgv3j:" />-->
<!--		<h:outputText id="kgv3j" value="#{stock.kgv3j}" />-->
<!---->
<!--		<h:outputLabel for="kgv4j" value="kgv4j:" />-->
<!--		<h:outputText id="kgv4j" value="#{stock.kgv4j}" />-->
<!--	</p>-->


	<!-- 4th row  kurse    -->
<!--	<p>-->
<!--		<b>KURSE</b>-->
<!--	</p>-->
<!--	<p>-->
<!--		<label style="width: 10em;" for="kursNow">zzz</label>-->
<!--		<h:outputText id="kursNow" value="#{stock.kursNow}" />-->
<!---->
<!--		<h:outputLabel for="kurs6monate" value="kurs6monate" />-->
<!--		<h:outputText id="kurs6monate" value="#{stock.kurs6monate}" />-->
<!---->
<!--		<h:outputLabel for="kurs1jahr" value="kurs1jahr" />-->
<!--		<h:outputText id="kurs1jahr" value="#{stock.kurs1jahr}" />-->
<!---->
<!--	</p>-->
<!---->
	<!--		-->
<!--	<p>-->
<!--		<b>Sonstiges</b>-->
<!--	</p>-->
<!--	<p>-->
<!--		<h:outputLabel for="dreimonatsReversal" value="dreimonatsReversal" />-->
<!--		<h:outputText id="dreimonatsReversal"-->
<!--			value="#{stock.dreimonatsReversal}">-->
<!--		</h:outputText>-->
<!---->
<!--		<h:outputLabel for="analystenMeinung" value="analystenMeinung" />-->
<!--		<h:outputText id="analystenMeinung" value="#{stock.analystenMeinung}">-->
<!--		</h:outputText>-->
<!---->
<!--	</p>-->
</ui:composition>
